import service from "@/utils/request";

export function getCategoryList(data?: any) {
    return service.request({
        url: '/category/list',
        method: 'get',
        params: data
    })
}

export function deleteCategoryById(data?: any) {
    return service.request({
        url: '/category/delete/' + data,
        method: 'get'
    })
}

export function update(data?: any) {
    return service.request({
        url: '/category/updateState',
        method: 'post',
        params: data
    })
}
export function updateCategory(data?:any){
    return service.request({
        url:'/category/update',
        method:'post',
        params:data
    })
}
export function addCategory(data?:any){
    return service.request({
        url:'/category/edit',
        method:'post',
        params:data
    })
}